package bby.app.fettool;

import java.io.File;
import java.util.Date;

public class RecvFile {
    String name="",md5="",enkey="",userAddress="";
    Date time;
    long size=0;
    boolean isDecode = false;
    RecvFile(String name,String md5,String enkey,String userAddress,long size,Date time){
        this.name=name;
        this.md5=md5;
        this.enkey=enkey;
        this.userAddress=userAddress;
        this.time=time;
        this.size=size;
    }
    RecvFile(String name,String md5,String enkey,String userAddress ){
        this.name=name;
        this.md5=md5;
        this.enkey=enkey;
        this.userAddress=userAddress;
        this.time=new Date();
    }

    @Override
    public String toString() {
        return  "文件名："+name+" ("+(isDecode?"已解密)\n":"未解密)\n")+
                "MD5："+md5+'\n'+
                "对称秘钥（密文）："+enkey+'\n'+
                "发送者："+userAddress+'\n'+
                "大小："+size/1024+" KB\n"+
                "接收时间："+time;
    }
}
